<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <h1>欢迎,<%= name %></h1>


  <% if (isLogin) { %>
    <button onclick="isLogin=false">退出登录</button>
  <% } else { %>
    <button onclick="isLogin=true">登录</button>
  <% } %>

  <ul>
    <% for (var i=0; i < fruits.length; i++) { %>
      <li><%= fruits[i] %></li>
    <% } %>
  </ul>

  <!-- include()引入公用模板=号转义，-号不转 -->
  <%- include('./footer.ejs') %>
</body>
</html>